package com.atguigu.lease.common.exceptionhandler;


import com.atguigu.lease.common.result.ResultCodeEnum;
import lombok.Data;

@Data
public class BusException extends RuntimeException {
    private Integer code;
    private String message;

    public BusException(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public BusException(ResultCodeEnum resultCodeEnum) {
        this.code = resultCodeEnum.getCode();
        this.message = resultCodeEnum.getMessage();
    }
}
